gridpack::powerflow::PFSolverHelper Struct Reference

#include <pf_helper.hpp>

Collaboration diagram for gridpack::powerflow::PFSolverHelper:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 PFSolverHelper (boost::shared_ptr< PFFactoryModule > factory, boost::shared_ptr< PFNetwork > network)
void update (const math::RealVector &Xcur)
void operator() (const math::RealVector &Xcur, math::RealMatrix &theJ)
void operator() (const math::RealVector &Xcur, math::RealVector &PQ)

Public Attributes

boost::shared_ptr
< PFFactoryModule
p_factory
boost::shared_ptr< PFNetworkp_network
boost::shared_ptr
< math::RealMatrix
J
boost::shared_ptr
< math::RealVector
Xold
boost::shared_ptr
< math::RealVector
X
boost::shared_ptr
< math::RealVector
Xdelta

Detailed Description

A helper functor for the powerflow solver. This is a utility functor that provides functions that build the Jacobian and RHS from the network.


Constructor & Destructor Documentation

gridpack::powerflow::PFSolverHelper::PFSolverHelper ( boost::shared_ptr< PFFactoryModule factory,
boost::shared_ptr< PFNetwork network 
)

Member Function Documentation

void gridpack::powerflow::PFSolverHelper::operator() ( const math::RealVector Xcur,
math::RealVector PQ 
)

Build the RHS function vector. This is called by the nonlinear solver each iteration to build the RHS vector from the current network state. This is also responsible for updating the network state with the current solution estimate, which assumes that it is called only once per solver iteration. This may not be true if certain methods are used or if a finite difference Jacobian is computed by the solver.

Parameters:
Xcur current state estimate
PQ computed RHS vector

References gridpack::mapper::BusVectorMap< _network >::mapToRealVector(), p_factory, p_network, gridpack::powerflow::RHS, and update().

void gridpack::powerflow::PFSolverHelper::operator() ( const math::RealVector Xcur,
math::RealMatrix theJ 
)

Build the Jacobian Matrix. This is called by the nonlinear solver each iteration to build the Jacobian from the current network state.

Parameters:
Xcur current state estimate
J Jacobian

References gridpack::powerflow::Jacobian, gridpack::mapper::FullMatrixMap< _network >::mapToRealMatrix(), p_factory, and p_network.

void gridpack::powerflow::PFSolverHelper::update ( const math::RealVector Xcur  ) 

Push the current estimated state back onto the network. The network state (voltage, phase) is updated with the current estimate from the nonlinear solver.

FIXME: The problem here is that ...mapToBus expects the CHANGE (old - current)? in state variables. IMHO, there should be a way to set the state variables directly. The solver should be responsible for making the entire estimate.

Parameters:
Xcur current state estimate from the solver

References gridpack::mapper::BusVectorMap< _network >::mapToBus(), p_factory, p_network, gridpack::powerflow::RHS, Xdelta, and Xold.


Member Data Documentation

The current network state estimate. This vector provides a space for the nonlinear solve to store the current solution estimate. It should be filled with the initial condition, handed to the nonlinear solver, and not changed afterward.

The difference between the current and previous estimate. See update() for why this is necessary.

See update() for why this is necessary.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1